<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <!-- build:css -->
        <link rel="stylesheet" href="/static/lib/kitadmin/css/layui.css" th:href="@{/lib/kitadmin/css/layui.css}">
        <link rel="stylesheet" href="/static/lib/kitadmin/css/theme/default.css"
              th:href="@{/lib/kitadmin/css/theme/default.css}" id="theme">
        <link rel="stylesheet" href="/static/lib/kitadmin/css/nprogress.css"
              th:href="@{/lib/kitadmin/css/nprogress.css}">
        <!-- endbuild -->
        <style>
            .eleTree {
                width: 350px;
                height: 500px;
                border: 1px solid #ccc;
                overflow: hidden;
                display: inline-block;
                position: absolute;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <form class="layui-form" lay-filter="form-menu">
                <input type="hidden" name="parentId" th:value="${menu.menuId}"/>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="menuName" placeholder="" autocomplete="off" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">显示顺序：</label>
                    <div class="layui-input-block">
                        <input type="text" name="orderNum" placeholder="" autocomplete="off" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">请求地址：</label>
                    <div class="layui-input-block">
                        <input type="text" name="url" placeholder="" autocomplete="off" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单类型：</label>
                    <div class="layui-input-block">
                        <input type="radio" name="menuType" value="M" title="目录"/>
                        <input type="radio" name="menuType" value="C" title="菜单"/>
                        <input type="radio" name="menuType" value="F" title="按钮"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单状态：</label>
                    <div class="layui-input-block">
                        <span th:each="dict : ${@dict.getType('sys_show_hide')}">
                            <input type="radio" th:id="${dict.dictCode}" name="visible" th:value="${dict.dictValue}" th:title="${dict.dictLabel}" th:checked="${dict.isDefault == 'Y' ? true : false}" />
                        </span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">权限标识：</label>
                    <div class="layui-input-block">
                        <input type="text" name="perms" placeholder="" autocomplete="off" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单图标：</label>
                    <div class="layui-input-block">
                        <input type="text" name="icon" placeholder="" autocomplete="off" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注：</label>
                    <div class="layui-input-block">
                        <textarea rows="3" type="text" name="remark" placeholder="" autocomplete="off" class="layui-input"></textarea>
                    </div>
                </div>
                <button class="layui-btn" id="btn-add" style="display:none" lay-submit lay-filter="btn-add">创建</button>
            </form>
        </div>
        <script src="../static/lib/kitadmin/polyfill.min.js" th:src="@{/lib/kitadmin/polyfill.min.js}"></script>
        <script src="../static/lib/kitadmin/layui.js" th:src="@{/lib/kitadmin/layui.js}"></script>
        <script src="../static/lib/kitadmin/kitadmin.js" th:src="@{/lib/kitadmin/kitadmin.js}"></script>

        <script th:inline="javascript">
            var ctx = [[@{
                /}]];
                var editFlag = [[${@permission.hasPermi('system:menu:edit')}]];
                var prefix = ctx + "system/menu";
        </script>
        <script>
            layui.config({
                base: '/js/admin/menu/'
            }).use(['add'], function () {
                var add = layui.add;
                add.init({
                    "prefix": prefix,
                    "editFlag": editFlag
                });
            });
        </script>
    </body>
</html>